home *** CD-ROM | disk | FTP | other *** search
- global gRootPath, gDiv, mp3List, selecta
-
- on stopMovie
- repeat with i = 1 to the number of castMembers of castLib 5
- member(i, 5).erase()
- end repeat
- end
-
- on InitMediaPlayer
- repeat with i = 1 to the number of castMembers of castLib 5
- member(i, 5).erase()
- end repeat
- mp3List = []
- thePath = gRootPath & "DiscContent" & gDiv & "Resources" & gDiv & "PodCasts" & gDiv
- u = getNetText(thePath & "playlist.txt")
- if netDone(u) then
- c = netTextResult(u)
- end if
- iCount = 1
- repeat with i = 1 to c.line.count
- mp3List[iCount] = [:]
- mp3List[iCount][#pTitle] = c.line[i]
- i = i + 1
- o = new(#sound, castLib(5))
- o.fileName = thePath & c.line[i]
- mp3List[iCount][#pFilename] = o
- iCount = iCount + 1
- end repeat
- selecta = 1
- put mp3List[1].pFilename
- sound(2).queue(mp3List[1].pFilename)
- member("tickertape").text = "Click the 'play' button to begin playing the podcasts"
- put "MP3 Player Done"
- end
-
- on PlayMedia
- sound(2).play()
- member("tickertape").text = mp3List[selecta].pTitle
- end
-
- on PauseMedia
- sound(2).pause()
- end
-
- on NextMedia
- selecta = selecta + 1
- if selecta > mp3List.count then
- selecta = 1
- end if
- sound(2).stop()
- sound(2).queue(mp3List[selecta].pFilename)
- member("tickertape").text = mp3List[selecta].pTitle
- sound(2).play()
- end
-
- on PrevMedia
- selecta = selecta - 1
- if selecta < 1 then
- selecta = mp3List.count
- end if
- sound(2).stop()
- sound(2).queue(mp3List[selecta].pFilename)
- member("tickertape").text = mp3List[selecta].pTitle
- sound(2).play()
- end
-
- on StopMedia
- sound(2).stop()
- end
-